//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { MinishopSku, MinishopSkuResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooMinishopSkuList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<MinishopSkuResponse>(`/uctoo/minishop_sku/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooMinishopSku = async (id: string) => {
  return requestClient.get<MinishopSku>(`/uctoo/minishop_sku/${id}`);
};

export const adductooMinishopSku = async (data: Partial<MinishopSku>) => {
  return requestClient.post<MinishopSku>('/uctoo/minishop_sku/add', data);
};

export const edituctooMinishopSku = async (data: Partial<MinishopSku>) => {
  return requestClient.post<MinishopSku>('/uctoo/minishop_sku/edit', data);
};

export const deleteuctooMinishopSku = async (id: string) => {
  return requestClient.post<any>('/uctoo/minishop_sku/del', { id });
};
